set %-mirc.rejoins $remtok(%-mirc.rejoins,$chan,32)
set %-mirc.rejoins2 $addtok(%-mirc.rejoins2,$chan,32)
.raw mode $chan
}
inc %-joining
set %-joinchans $addtok(%-joinchans,$chan,32)
unset %-namec.*
dispr-div $chan
}
alias _dowuh if ($right(%-uhsearch,6) == .clean) { .timer925 1 4 _dowuh | halt } | .timer925 off | if (%-willuhost == $null) halt | .raw userhost %-willuhost | set %-uhsearch %-uhsearch .group | unset %-willuhost
on 1:input:@Quick:window -c @Quick | %_timer.quick = $1- | .timer -om 1 1 % $+ _timer.quick | halt
on 1:input:@Question:window -c @Question | .timer927 off | %_timer.preq = $_f2s($1-) | .timer -om 1 1 % $+ _preq.c % $+ _timer.preq | halt
on 1:input:@Peace:window -c @Peace | .timer927 off | _timer924on | if ((%_+pe.req) && ($1- == $chr(160))) halt | %_timer.peace = $_f2s($1-) | .timer -om 1 1 % $+ _pe.command % $+ _timer.peace | halt
on 1:input:#:{
if (($left($1,2) == //) || ($left($1,2) == /.)) return
if ((%+nick.complete.text != $true) || (n isin %nick.complete.chars) || (%nick.complete.chars == off)) goto normal
if (($left($1,1) == /) || ($len($1) == 1) || ($left($1,1) isin %nick.complete.chars) || ($left($1,1) == ")) goto normal
unset %.nc.said
if ($right($1,1) isin %nick.complete.chars) {
set %.nc.n $pos(%nick.complete.chars,$right($1,1))
set %.nc.act $right($1,1)
set %.nc.to $_lchop(1,$1)
set %.nc.said $2-
goto doit
}
set %.nc.n $len(%nick.complete.chars)
:loopc
set %.nc.act $mid(%nick.complete.chars,%.nc.n,1)
if (%.nc.act == $2) { set %.nc.to $1 | set %.nc.act $2 | goto doit }
if ((%.nc.act !isin $1) || (%.nc.act == -)) { if ($_vd(.nc.n) > 0) goto loopc | goto normal }
set %.nc.to $gettok($1,1,$asc(%.nc.act))
:doit
if ($findtok(yes no uh uhh hey um umm er err heh hehe hah haha well ok okay so wow ack look see duh doh now o oh ah ahh hi yo i and nah,%.nc.to,32) != $null) goto normal
set %.nc.to $_nickcomp(%.nc.to,$active)
if (%.nc.to != $null) {
set %.nc.msg $replace($replace($replace($_getmsg(misc,nickcomplete),&chan&,$active),&nick&,%.nc.to),&char&,%.nc.act)
if (%.nc.said == $null) { if (%.nc.act == $2) set %.nc.said $3- | else set %.nc.said $gettok($1,2-,$asc(%.nc.act)) $2- }
if (%.nc.said == $null) goto normal
if (%+cnc.on) set %.nc.said $_cncapply($_inlinenc(%.nc.said))
elseif (%+strip.from.input) set %.nc.said $_stripout($_inlinenc(%.nc.said))
else set %.nc.said $_inlinenc(%.nc.said)
if (&msg& isin %.nc.msg) set %.nc.msg $replace(%.nc.msg,&msg&,%.nc.said)
else set %.nc.msg %.nc.msg %.nc.said
say $_finalmsg(%.nc.msg)
halt
}
:normal
if (%+cnc.on) {
if ($left($1,1) == /) {
if (%+nick.complete.cmd) $_cncapplycmd($1 [ $_inlinenc($2-) ] )
else $_cncapplycmd($1-)
}
else say $_cncapply($_inlinenc($1-))
halt
}
if (%+strip.from.input) {
if ($left($1,1) == /) {
if (%+nick.complete.cmd) $_stripout($1 [ $_inlinec($2-) ] )
else $_stripout($1-)
}
else say $_stripout($_inlinenc($1-))
halt
}
if (%nick.complete.inline isin $1-) {
if ($left($1,1) != /) { say $_inlinenc($1-) | halt }
elseif (%+nick.complete.cmd) { $1 $_inlinenc($2-) | halt }
}
}
on 1:input:?:{
if (($left($1,2) == //) || ($left($1,2) == /.)) return
if (%+cnc.on) {
if ($left($1-,1) == /) $_cncapplycmd($1-)
else say $_cncapply($1-)
halt
}
if (%+strip.from.input) {
if ($left($1,1) == /) $_stripout($1-)
else say $_stripout($1-)
halt
}
}
alias -l _inlinenc {
if (($len(%nick.complete.inline) != 1) || (%nick.complete.inline !isin $1-)) return $1-
set %.search $+ %nick.complete.inline
set %.text $+ $_s2p($1-) $+
set %.s1 %.search $+
set %.s2 $chr(160) $+ %nick.complete.inline $+
set %.text $replace(%.text,%.s1,%.s2)
:loop1
set %.pos $pos(%.text,%.search)
if (%.pos == $null) return $_f2s($_p2s(%.text))
set %.bit $gettok($_rchop($_i(%.pos),%.text),1,127)
unset %.aft
:loop2 | if (($right(%.bit,1) isin `~!@#$%&*()-=+;:'",.<>/?) || ($right(%.bit,2) isin 's`s)) { set %.aft $right(%.bit,1) $+ %.aft | set %.bit $_lchop(1,%.bit) | goto loop2 }
if ($len(%.bit) > 1) set %.comp $_nickcomp(%.bit,$active) | else unset %.comp
if (%.comp != $null) set %.new $chr(160) $+ $_finalmsg($replace($replace($replace($_getmsg(misc,inlinenickc),&chan&,$active),&nick&,%.comp),&char&,%nick.complete.inline)) $+ %.aft
else set %.new $chr(160) $+ %nick.complete.inline $+ %.bit $+ %.aft
if ($findtok(%.op.chan,any,32) != $null) set %.op.chan %.op.chan $2- $_getchans
if (nopw isin $level(%.op.addr)) { unset %.op.pw | if ($2 == $null) goto doall | goto doone }
if (%.op.pw == $null) {
disps %col.target $+ $nick $+ tried to use OPME before setting a password. %col.misc $+ ( $+ $1- $+ )
_qnotice $nick A password has not been set. Use PASS to set a password.
}
elseif (($2 != %.op.pw) && ($3 != %.op.pw)) {
disps %col.target $+ $nick $+ used the wrong password for their OPME command. %col.misc $+ ( $+ $1- $+ ) %col.att $+ Ignoring CTCPs from user for 30 seconds.
_qnotice $nick Password incorrect. Ignoring CTCPs for 30 seconds.
if (($me isop %.op.try) && ($nick ison %.op.try)) .raw mode %.op.try +o $nick
}
halt
}
ctcp op:PASS:?:{
set %.+disphalt $true
set %.op.addr $maddress($fulladdress)
set %.op.pw %oppass. [ $+ [ %.op.addr ] ]
unset %.op.new
if ($2 == $null) {
disps %col.target $+ $nick $+ used PASS with no parameters. (sending usage info.)
_qnotice $nick Usage: PASS (oldpass) newpass
halt
}
if (%.op.pw == $null) set %.op.new $2
elseif ($2 == %.op.pw) set %.op.new $3
elseif ($3 == %.op.pw) set %.op.new $2
else {
disps %col.target $+ $nick $+ tried to change their PASS but gave the wrong original password. %col.misc $+ ( $+ $1- $+ ) %col.att $+ Ignoring CTCPs from user for 30 seconds.
_qnotice $nick Password incorrect. Ignoring CTCPs for 30 seconds.
.ignore -tu30 $wildsite
halt
}
if (%.op.new == $null) {
disps %col.target $+ $nick $+ used PASS with their old pass but didn't specify a new one. %col.misc $+ ( $+ $1- $+ )
_qnotice $nick You need to specify a new password along with your old one.
halt
}
disps %col.target $+ $nick $+ set their OPME password to %col.info1 $+ %.op.new $+ . %col.misc $+ ( $+ $1- $+ )
_qnotice $nick Password set to " $+ %.op.new $+ "
set %oppass. [ $+ [ %.op.addr ] ] %.op.new
}
ctcp op:HELP:?:{
set %.+disphalt $true
disps %col.target $+ $nick $+ requested help on OPME commands. %col.misc $+ ( $+ $1- $+ )
_qnotice $nick OPME (channel) password - Requests ops on a channel, or all valid channels if none given.
_qnotice $nick PASS (oldpass) newpass - Sets or changes your password.
else set %.kicker $remove($remove($1,$chr(40)),$chr(41))
}
if (($level($maddress($address(%.kicker,5))) < 50) && (%.kicker ison $chan)) k $chan %.kicker $_finalmsg($replace($replace($_getmsg(Misc,ProtKick),&chan&,$chan),&nick&,$knick))
on +1:open:?:if (%-extremeq > %extremequery) { _timersinc %-eqtimersec -extremeq | halt } | else _doexq
on +1:action:*:?:if ($query($nick) != $nick) { if (%-extremeq > %extremequery) { _timersinc %-eqtimersec -extremeq | closemsg $nick | halt } | else _doexq }
alias -l _doexq {
_timersinc %extremequery.sec -extremeq
if (%-extremeq > %extremequery) {
disps New query flood- %extremequery new query windows in %extremequery.sec seconds! All new query windows from unrecognized addresses will be ignored until flood ends.
on 1:ctcpreply:*:set %.iden $gettok($address,1,64) | if (%-+findping. [ $+ [ %.iden ] ] == $null) return | dispa New nickname for %col.target $+ %-+findpingn. [ $+ [ %.iden ] ] $+ is %col.att $+ $nick | set %-+findping. [ $+ [ %.iden ] ] | set %-+findpingn. [ $+ [ %.iden ] ] | set %.+disphalt $true | halt
on 1:notice:*:?:set %.iden $gettok($address,1,64) | if (%-+findping. [ $+ [ %.iden ] ] == $null) return | dispa New nickname for %col.target $+ %-+findpingn. [ $+ [ %.iden ] ] $+ is %col.att $+ $nick | set %-+findping. [ $+ [ %.iden ] ] | set %-+findpingn. [ $+ [ %.iden ] ]
ctcp 1:*:?:if (@ !isin $target) return | dispa Warning- %col.target $+ $nick $+ %col.att $+ may be trying to detect your new nickname (if you changed nicknames recently)